<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <script src="../js/jquery-1.4.2.js"></script>
    <script src="../js/jquery.js"></script>
    <script src="../js/pintuer.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>
<div class="panel admin-panel" style="height: 500px">
    <div class="panel-head"><strong class="icon-reorder"> 按课程名统计旷课信息</strong></div>
    <div class="padding border-bottom">
        <%--    输入按钮组--%>
        <div class="form-group" >
            <script>
                $(function() {<!--点击查询按钮触发的事件-->
                    var $tds=$("#table").empty();<!--清空子元素-->
                    $("#table").append("<tr>\n" +
                        "      <th width=\"15%\">课程名</th>\n" +
                        "      <th width=\"15%\">缺课次数</th>\n" +
                        "    </tr>");<!--添加表头-->
                    // 查询数据
                    $.post("/getCensusAttendanceCount",function (data) {
                        if(data.length==0){
                            $("#table").append("<tr><td colspan='2' align='center'>空</td></tr>");
                        }
                        for(j = 0; j < data.length; j++) {
                            var t="<tr><td>"+data[j].lessonname+"</td><td>"+data[j].count+"</td></tr>";
                            $("#table").append(t);
                        }

                    },"json");
                });
            </script>
            <%--      <div style="width: 1080px;height: 20px"></div><!--用来填充-->--%>
        </div>
    </div>
    <table class="table table-hover text-center" id="table">
        <tr>
            <th width="15%">课程名</th>
            <th width="15%">缺课次数</th>
        </tr>

    </table>
</div>
</div>
</body></html>
